import 'package:extended_image/extended_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_application_1/utils/source_utils.dart';

Widget? commonLoadStateChanged(ExtendedImageState state) {
  if (state.extendedImageLoadState == LoadState.completed) {
    return state.completedWidget;
  } else {
    return Container(
      color: Color.fromRGBO(229, 233, 239, 1),
      alignment: Alignment.bottomCenter,
      child: Image.asset(
        ImageUtils.wrapAssets('image-loading.gif'),
      ),
    );
  }
}
